﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;

namespace test
{
    class Program
    {
        [DllImport("user32.dll", SetLastError = true)]
        static extern IntPtr FindWindow(string lpClassName, string lpWindowName);

        static void Main(string[] args)
        {
            File.Delete("d:\\1.txt");

            String winTitle = "深度学习 Deeplearning4j";
            IntPtr hwnd = FindWindow(null, winTitle);
            QqWindowHelper a = new QqWindowHelper(hwnd, winTitle);
            Console.WriteLine(a.GetContent());
         //   Console.Write("over");
      //   System.Console.ReadLine();
            //System.IO.File.WriteAllText("D:\\1.txt", a.GetContent());
        }
    }
}
